package com.liuyc.lib.common.storage.db

import android.app.Application
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.room.migration.Migration

/**
 * 数据库 升级
 */
class DataBaseUpdate {

    fun updateDBVersion(application:  Application, clazz: Class<RoomDatabase>, dbName: String, vararg migrations: Migration) {
        Room.databaseBuilder(application,
                clazz, dbName)
                .addMigrations(*migrations)
                .build()
    }

}